package com.godme.gateway.sentinel;

import com.alibaba.csp.sentinel.slots.block.BlockException;

import javax.servlet.http.HttpServletResponse;

public class UserEndpointSentinelResource {

    public static boolean sendCodeBlock(String mail, BlockException bk){
        System.err.println("sendCodeBlock " + bk.getMessage());
        return false;
    }
    public static boolean sendCodeFallback(String mail, Throwable throwable){
        System.err.println("sendCodeFallback : " + throwable.getMessage());
        return false;
    }

    public static boolean loginBlock(HttpServletResponse response, String mail, String password, BlockException bk){
        System.err.println("loginBlock :" + bk.getMessage());
        return false;
    }
    public static boolean loginFallback(HttpServletResponse response,String mail,  String password, Throwable throwable){
        System.err.println("loginFallback : " + throwable.getMessage());
        return false;
    }

    public static boolean registerBlock(String mail,String password, String code, BlockException bk){
        System.err.println("registerBlock :" + bk.getMessage());
        return false;
    }
    public static boolean registerFallback( String mail, String password,  String code, Throwable throwable){
        System.err.println("registerFallback : " + throwable.getMessage());
        return false;
    }
}
